//
//  BaseModel.m
//  MyDIYHouse
//
//  Created by dlios on 15-6-29.
//  Copyright (c) 2015年 李平洋. All rights reserved.
//

#import "BaseModel.h"

@implementation BaseModel
- (instancetype)initWithDic:(NSDictionary *)dic
{
    self = [super init];
    if (self) {
        //KVC的赋值方法
        [self setValuesForKeysWithDictionary:dic];
    }
    return self;
}


- (void)setValue:(id)value forUndefinedKey:(NSString *)key{
    // id
    if ([key isEqualToString:@"id"]) {
        self.bId = value;
    }
    // description
    if ([key isEqualToString:@"description"]) {
        self.bDescription = value;
    }
    
}

@end
